-- GENERATED SPELL FOR [Whitebark's Spirit] --


function spell0_19456(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(31287,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19456', 3500, 1)
end

function spell1_19456(pUnit, Event) --@Withered Touch,n/a--
pUnit:FullCastSpellOnTarget(11442,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19456', 0, 1)
end

function Sorts_19456(pUnit, Event)
local choix_sorts_19456 = math.random(0, 1)
if choix_sorts_19456 == 0 then
pUnit:RegisterEvent('spell0_19456', 1, 1)
end
if choix_sorts_19456 == 1 then
pUnit:RegisterEvent('spell1_19456', 1, 1)
end
end

function mob19456_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19456', math.random(1500, 3000), 1)
end

function mob19456_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19456_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19456_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19456, 1, 'mob19456_Action')
RegisterUnitEvent(19456, 2, 'mob19456_Leave')
RegisterUnitEvent(19456, 3, 'mob19456_Kill')
RegisterUnitEvent(19456, 4, 'mob19456_Die')
